<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

	<ui:composition 
	  xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      template="/view/templates/templateLayout.xhtml">
      
      <ui:define name="conteudo">
      <link rel="stylesheet" type="text/css" href="./estilos.css"/>       	
  	
<h:form id="formExcluirCargo" prependId="false">  
	<p:panel id="panelExcluirCargo" style="margin-bottom:20px; ">  
	<f:facet name="header">
		<h:outputText value="Excluir Cargo" styleClass="outputTextTitulo"/>
	</f:facet>
 	<p:messages id="messagesExcluirCargo" autoUpdate="true" closable="true" /> 
    	<h:panelGrid  columns="2" style="margin-top:20px; margin-right:10%;">  
            <h:outputLabel value="Código" styleClass="outputLabel"/>  
            <h:outputLabel value="Cargo*" styleClass="outputLabel"/>             
            <p:inputText value="#{cargoBean.cargo.idCargo}" styleClass="inputId" disabled="true"/>  
  			<p:inputText value="#{cargoBean.cargo.cargo}" styleClass="inputDescricao" disabled="true"/>  
        </h:panelGrid>  

    </p:panel>  
    <p:commandButton value="Excluir" onclick="confirmation.show()" type="button" styleClass="commandButton" /> 
	<p:commandButton value="Cancelar" action="#{cargoBean.consultarCargo}" immediate="true" style="margin-right:20px;" /> 
</h:form>  	

    <p:confirmDialog id="confirmDialog" message="Excluir Cargo?"  
                header="Confirmar exclusão" widgetVar="confirmation" appendToBody="true" >  
                  
        <p:commandButton id="confirm" value="Sim" oncomplete="confirmation.hide()" process="@this" 
                    action="#{cargoBean.deleteCargo}" />  
        <p:commandButton id="decline" value="Não" onclick="confirmation.hide()" type="button" />   
                  
    </p:confirmDialog>	


</ui:define>
</ui:composition>
